﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace KylinORM.Data
{
    /// <summary>
    /// 数据查询请求
    /// </summary>
    public struct DataQuery
    {
        /// <summary>
        /// 数据库命令
        /// </summary>
        public IDbCommand Command;

        private CommandType commandType;
        /// <summary>
        /// 命令类型
        /// </summary>
        public CommandType CommandType
        {
            get
            {
                if ((int)this.commandType == 0)
                    this.commandType = System.Data.CommandType.Text;

                return this.commandType;
            }
            set { this.commandType = value; }
        }
        /// <summary>
        /// 命令内容
        /// </summary>
        public string CommandText { get; set; }
        /// <summary>
        /// 命令参数
        /// </summary>
        public object[] Parameters { get; set; }
    }
}
